import { $http } from './index';
import { TreeChildModel,buildTagsModel} from '@/views/products/selectByTag/selectByTag.module';

export const getTopTags = ():Promise<Array<TreeChildModel>> => {
    return $http({
        url: '/tag/td/topTags',
        method: 'get',
    });
};
export const getChildTags= (tid:number):Promise<Array<TreeChildModel>> => {
    return $http({ url: `/tag/td/childTags?tid=${tid}`, method: 'get'});
};
export const allBulidTags= ():Promise<buildTagsModel> => {
    return $http({ url: '/tag/xc/allTags', method: 'get'});
};

export const getTagQueryData = (params: object)=> {
    return $http.post('/tag/td/create', params);
};

export const getBuildingTagQueryData = (params: object)=> {
    return $http.post('/tag/xc/filter', params);
};
